package com.xtaller.easy.admin.specification;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.*;


/**
 * Created by Taller on 2018/4/13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value ="用户登录信息")
public class UserLogin {
    @ApiModelProperty(value = "登录账号")
    @Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\\\d{8}$")
    private String loginName;
    @ApiModelProperty(value = "登录密码")
    @Size(min = 6, max = 18)
    private String password;
    @ApiModelProperty(value = "平台 1android 2ios 3pc 4webapp 5其他")
    @Min(1)
    @Max(5)
    private int platform = 3;
    @ApiModelProperty(value = "子系统code")
    private String module = "sys-admin-panel";

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getPlatform() {
        return platform;
    }

    public void setPlatform(int platform) {
        this.platform = platform;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }
}
